package com.wjjun.databinding;

import android.databinding.BindingAdapter;

import com.wjjun.customview.views.dropdownmenu.DropDownMenu;
import com.wjjun.customview.views.dropdownmenu.MenuAdapter;
import com.wjjun.customview.views.dropdownmenu.OnItemMenuClickListener;

/**
 * DropDownMenuAdapter
 * Created by 67535 on 2018/5/21.
 */
public class DropDownMenuAdapter {

    @BindingAdapter(value = "adapter")
    public static void setTabs(DropDownMenu dropDownMenu, MenuAdapter adapter) {
        if (adapter != null) {
            dropDownMenu.setMenuAdapter(adapter);
        }
    }

    @BindingAdapter(value = "listener")
    public static void setListener(DropDownMenu dropDownMenu, OnItemMenuClickListener listener) {
        dropDownMenu.setOnItemMenuClickListener(listener);
    }

}
